home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 726-750 / 737 / prlabel / prlabel.h < prev    next >
C/C++ Source or Header  |  1995-03-18  |  8KB  |  229 lines

  1. /***************************************************************************
  2.  
  3.    Program:    PrLabel
  4.    File:       PrLabel.h
  5.    
  6.    Version:    V1.1
  7.    Date:       28.10.91
  8.    Function:   Main include file
  9.    
  10.    Copyright:  SciTech Software 1991
  11.    Author:     Andrew C. R. Martin
  12.    Address:    SciTech Software
  13.                23, Stag Leys,
  14.                Ashtead,
  15.                Surrey,
  16.                KT21 2TD.
  17.    Phone:      +44 (0372) 275775
  18.    EMail:      UUCP: cbmuk!cbmuka!scitec!amartin
  19.                JANET: andrew@uk.ac.ox.biop
  20.                
  21. ****************************************************************************
  22.  
  23.    This program is not in the public domain, but it may be freely copied
  24.    and distributed for no charge providing this header is included.
  25.    The code may be modified as required, but any modifications must be
  26.    documented so that the person responsible can be identified. If someone
  27.    else breaks this code, I don't want to be blamed for code that does not
  28.    work! The code may not be sold commercially without prior permission from
  29.    the author, although it may be given away free with commercial products,
  30.    providing it is made clear that this program is free and that the source
  31.    code is provided with the program.
  32.  
  33. ****************************************************************************
  34.  
  35.    Description:
  36.    ============
  37.  
  38. ****************************************************************************
  39.  
  40.    Usage:
  41.    ======
  42.    PrLabel is a program to print text for laser labels.
  43.  
  44. ****************************************************************************
  45.  
  46.    Revision History:
  47.    =================
  48.    V1.1     17.01.92
  49.    Placed includes in this file.
  50.    V1.2     14.09.92
  51.    Added GlobSepChar
  52.  
  53. ***************************************************************************/
  54. /* Includes
  55. */
  56. #include <exec/types.h>
  57. #include <workbench/startup.h>
  58. #include <proto/intuition.h>
  59. #include <proto/icon.h>
  60. #include <sts/stslib.h>
  61. #include <stdio.h>
  62. #include "MyIO.h"
  63. #include "protos.h"
  64.  
  65. /**************************************************************************/
  66. /* Defines
  67. */
  68. #define SMALLBUFF 101
  69. #define LARGEBUFF 255
  70. #define MAXGROUPS 40
  71. #define MAXLINK   5
  72.  
  73. #define GRAPHICS_REV 29
  74. #define INTUITION_REV 29
  75. #define ASL_REV 36
  76.  
  77. #define LINELENGTH 77
  78. #define PAGELENGTH 63
  79. #define NLABLIN    7
  80.  
  81. #define THREE_EIGHT 1
  82. #define TWO_EIGHT   2
  83. #define TWO_SEVEN   3
  84.  
  85. /**************************************************************************/
  86. /* Structure definitions 
  87. */
  88. typedef struct
  89. {
  90.    int print,
  91.        x,
  92.        y;
  93. } LABEL;
  94.  
  95. typedef struct addr_entry
  96. {
  97.    char line[7][80];
  98.    struct addr_entry *prev;
  99.    struct addr_entry *next;
  100. } ADDR;
  101.  
  102.  
  103. /**************************************************************************/
  104. /* Externals
  105. */
  106. #ifdef MAIN
  107.  
  108. struct Window        *Window        = NULL;
  109. struct GfxBase       *GfxBase       = NULL;
  110. struct IntuitionBase *IntuitionBase = NULL;
  111. struct Library       *AslBase       = NULL;
  112. LABEL                label[3][8];
  113. int                  NLabel         = 1;
  114. int                  CurLabel       = 0;
  115. ADDR                 *address       = NULL;
  116. int                  SheetType      = THREE_EIGHT;
  117. int                  mb             = 10;          /* Menu bar height */
  118. struct Gadget        *Line1         = NULL,
  119.                      *Line2         = NULL,
  120.                      *Line3         = NULL,
  121.                      *Line4         = NULL,
  122.                      *Line5         = NULL,
  123.                      *Line6         = NULL,
  124.                      *Line7         = NULL,
  125.                      *pos11         = NULL,
  126.                      *pos12         = NULL,
  127.                      *pos13         = NULL,
  128.                      *pos14         = NULL,
  129.                      *pos15         = NULL,
  130.                      *pos16         = NULL,
  131.                      *pos17         = NULL,
  132.                      *pos18         = NULL,
  133.                      *pos21         = NULL,
  134.                      *pos22         = NULL,
  135.                      *pos23         = NULL,
  136.                      *pos24         = NULL,
  137.                      *pos25         = NULL,
  138.                      *pos26         = NULL,
  139.                      *pos27         = NULL,
  140.                      *pos28         = NULL,
  141.                      *pos31         = NULL,
  142.                      *pos32         = NULL,
  143.                      *pos33         = NULL,
  144.                      *pos34         = NULL,
  145.                      *pos35         = NULL,
  146.                      *pos36         = NULL,
  147.                      *pos37         = NULL,
  148.                      *pos38         = NULL,
  149.                      *Kill          = NULL,
  150.                      *Next          = NULL,
  151.                      *Prev          = NULL,
  152.                      *Print         = NULL;
  153. struct Menu          *Menu1         = NULL;
  154. struct MenuItem      *MenuItem1     = NULL,
  155.                      *MenuItem2     = NULL,
  156.                      *MenuItem3     = NULL,
  157.                      *MenuItem4     = NULL;
  158. char                 Line1SIBuff[80],
  159.                      Line2SIBuff[80],
  160.                      Line3SIBuff[80],
  161.                      Line4SIBuff[80],
  162.                      Line5SIBuff[80],
  163.                      Line6SIBuff[80],
  164.                      Line7SIBuff[80],
  165.                      GlobSepChar;
  166.  
  167. #else /*--------------------------------------------------------------------*/
  168.  
  169. extern struct Window          *Window;
  170. extern struct GfxBase         *GfxBase;
  171. extern struct IntuitionBase   *IntuitionBase;
  172. extern struct Library         *AslBase;
  173. extern LABEL                  label[3][8];
  174. extern int                    NLabel;
  175. extern int                    CurLabel;
  176. extern ADDR                   *address;
  177. extern int                    SheetType;
  178. extern int                    mb;            /* Menu bar height */
  179. extern struct Gadget          *Line1,
  180.                               *Line2,
  181.                               *Line3,
  182.                               *Line4,
  183.                               *Line5,
  184.                               *Line6,
  185.                               *Line7,
  186.                               *pos11,
  187.                               *pos12,
  188.                               *pos13,
  189.                               *pos14,
  190.                               *pos15,
  191.                               *pos16,
  192.                               *pos17,
  193.                               *pos18,
  194.                               *pos21,
  195.                               *pos22,
  196.                               *pos23,
  197.                               *pos24,
  198.                               *pos25,
  199.                               *pos26,
  200.                               *pos27,
  201.                               *pos28,
  202.                               *pos31,
  203.                               *pos32,
  204.                               *pos33,
  205.                               *pos34,
  206.                               *pos35,
  207.                               *pos36,
  208.                               *pos37,
  209.                               *pos38,
  210.                               *Kill,
  211.                               *Next,
  212.                               *Prev,
  213.                               *Print;
  214. extern struct Menu            *Menu1;
  215. extern struct MenuItem        *MenuItem1,
  216.                               *MenuItem2,
  217.                               *MenuItem3,
  218.                               *MenuItem4;
  219. extern char                   Line1SIBuff[80],
  220.                               Line2SIBuff[80],
  221.                               Line3SIBuff[80],
  222.                               Line4SIBuff[80],
  223.                               Line5SIBuff[80],
  224.                               Line6SIBuff[80],
  225.                               Line7SIBuff[80],
  226.                               GlobSepChar;
  227.  
  228. #endif
  229.